package com.todo.strategy.online.iface.backend.response;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.Date;

/**
 * @author zhangwenxiang
 * @date 2024/3/17 19:35
 * @description
 */
@Data
@Schema(title = "用户攻略详情出参", description = "用户攻略详情出参")
public class UserStrategyDetailResp {


    @JsonSerialize(using = ToStringSerializer.class)
    @Schema(title = "主键id", description = "主键id")
    private String planId;

    @JsonSerialize(using = ToStringSerializer.class)
    @Schema(title = "攻略id", description = "攻略id")
    private String strategyId;

    @Schema(title = "用户id", description = "用户id")
    private String userId;

    @Schema(title = "计划清单集合", description = "计划清单集合")
    private PlanSetResp planSetResp;

    @Schema(title = "攻略信息", description = "攻略信息")
    private StrategyInfoResp strategyInfoResp;

    @Data
    public static class PlanSetResp {

        @Schema(title = "标题", description = "标题")
        private String title;

        @Schema(title = "描述", description = "描述")
        private String desc;

        @Schema(title = "主图", description = "主图")
        private String mainImg;

        @Schema(title = "计划开始时间", description = "计划开始时间")
        private Date startPlanTime;

        @Schema(title = "计划结束时间", description = "计划结束时间")
        private Date endPlanTime;

        @Schema(title = "计划城市", description = "计划城市")
        private String planCity;

        @Schema(title = "是否私有", description = "是否私有")
        private Integer isPrivate;

        @Schema(title = "预计耗时 - 按照详情计算", description = "预计耗时 - 按照详情计算")
        private Integer planUseTime;

        @Schema(title = "预计花费", description = "预计花费")
        private Integer planMoneySpend;

        @Schema(title = "关联内部数量", description = "关联内部数量")
        private Integer relationCount;

        @Schema(title = "状态", description = "状态")
        private Integer status;

        @Schema(title = "是否出行", description = "是否出行")
        private Integer isTravel;

        @Schema(title = "出行状态", description = "出行状态 0-未开始 1-进行中 2-已完成")
        private Integer travelStatus;
    }

    @Data
    public static class StrategyInfoResp {

        @Schema(title = "标题", description = "标题")
        private String title;

        @Schema(title = "出行体验", description = "出行体验")
        private TravelGuide guide;

        @Schema(title = "出行建议", description = "出行建议")
        private Suggest suggest;

        @Schema(title = "是否私有", description = "是否私有")
        private Integer isPrivate;

        @Schema(title = "是否关联攻略文章", description = "是否关联攻略文章")
        private Integer isAssociatePlanContent;

        @Schema(title = "状态", description = "状态")
        private Integer status;

        @Schema(title = "状态描述", description = "状态描述")
        private String statusStr;

        @Schema(title = "是否允许评论", description = "是否允许评论")
        private Integer allowComment;

        @Schema(title = "是否私有描述", description = "是否私有描述")
        private String isPrivateStr;

        @Schema(title = "来源", description = "来源")
        private String source;

        @Schema(title = "主图", description = "主图")
        private String mainImg;

        @Schema(title = "复用量", description = "复用量")
        private Integer referenceCount;

        @Schema(title = "浏览量", description = "浏览量")
        private Integer viewCount;

        @Schema(title = "点赞量", description = "点赞量")
        private Integer likeCount;

        @Schema(title = "收藏量", description = "收藏量")
        private Integer collectCount;

        @Schema(title = "评论数", description = "评论数")
        private Integer commentCount;

    }


    @Data
    public static class TravelGuide {

        @Schema(title = "城市体验", description = "城市体验")
        private String cityExp;

        @Schema(title = "游玩体验", description = "游玩体验")
        private String playExp;

        @Schema(title = "出行体验", description = "出行体验")
        private String travelExp;

        @Schema(title = "美食体验", description = "美食体验")
        private String foodExp;
    }

    @Data
    public static class Suggest {

        @Schema(title = "旅游建议", description = "旅游建议")
        private String travelSuggest;

        @Schema(title = "安全建议", description = "安全建议")
        private String securitySuggest;

        @Schema(title = "踩坑点", description = "踩坑点")
        private String defectSuggest;

        @Schema(title = "槽点", description = "槽点")
        private String disclose;
    }
}
